package capricornus.components.utils
{
	import capricornus.components.button.Button;
	import capricornus.components.utils.style.StyleType;
	
	import flash.display.DisplayObjectContainer;
	import flash.display.SimpleButton;

	public class AssetTool
	{
		public static function aplyButton( button:Button, btn:SimpleButton ):void
		{
			button.setSize( btn.width, btn.height );
			button.setStyle( StyleType.BTN_DOWN_STYLE_SKIN, btn.downState );
			button.setStyle( StyleType.BTN_OVER_STYLE_SKIN, btn.overState );
			button.setStyle( StyleType.BTN_UP_STYLE_SKIN, btn.upState );
			
			var parent:DisplayObjectContainer = btn.parent;
			if( parent != null )
			{
				parent.addChildAt( button, parent.getChildIndex(btn) );
				parent.removeChild( btn );
				button.setLocation( btn.x, btn.y );
			}
		}
		public function AssetTool()
		{
		}
	}
}